<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'spe-form',
	'action'=>$this->pre_module_url.'/attribute/create',
)); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'za_type'); ?>: 
		<?php echo $form->radioButtonList($model,'za_type',array( '2'=>t('Spe','adm') ),array('onclick'=>'$("#color").hide()')); ?>
		<input id="Attribute_za_type_2" value="2" type="radio" onclick="selectcolor()" name="Attribute[za_type]">
		<label><?php echo t('Color','adm') ?></label>
		<span class="c_999"><?php echo t('Spe Note','adm') ?></span>
	</div>

	<?php echo $form->hiddenField($model,'zca_id'); ?>
	<?php echo $form->hiddenField($model,'za_text_type',array('value'=>'checkbox')); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'za_title'); ?>: 
		<?php echo $form->textField($model,'za_title',array('size'=>50,'maxlength'=>50,'class'=>'t_ipt')); ?>
		<?php echo $form->error($model,'za_title'); ?>
	</div>
	<div id="color" class="d_n ml_40">
		<ul class="c_f">
			<li class="f_l w_100"><input class="chk" onclick="addcolor('军绿色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#5d762a;" for=""></label><label class="labelname" title="军绿色" for="">军绿色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('天蓝色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#1eddff;" for=""></label><label class="labelname" title="天蓝色" for="">天蓝色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('巧克力色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#d2691e;" for=""></label><label class="labelname" title="巧克力色" for="">巧克力色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('桔色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#ffa500;" for=""></label><label class="labelname" title="桔色" for="">桔色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('浅灰色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#e4e4e4;" for=""></label><label class="labelname" title="浅灰色" for="">浅灰色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('浅绿色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#98fb98;" for=""></label><label class="labelname" title="浅绿色" for="">浅绿色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('浅黄色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#ffffb1;" for=""></label><label class="labelname" title="浅黄色" for="">浅黄色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('深卡其布色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#bdb76b;" for=""></label><label class="labelname" title="深卡其布色" for="">深卡其布色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('深灰色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#666;" for=""></label><label class="labelname" title="深灰色" for="">深灰色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('深紫色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#4b0082;" for=""></label><label class="labelname" title="深紫色" for="">深紫色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('深蓝色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#041690;" for=""></label><label class="labelname" title="深蓝色" for="">深蓝色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('白色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#fff;" for=""></label><label class="labelname" title="白色" for="">白色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('粉红色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#ffb6c1;" for=""></label><label class="labelname" title="粉红色" for="">粉红色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('紫罗兰')" type="checkbox" name="" /><label class="color_lump" style="background-color:#dda0dd;" for=""></label><label class="labelname" title="紫罗兰" for="">紫罗兰</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('紫色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#800080;" for=""></label><label class="labelname" title="紫色" for="">紫色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('红色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#ff0000;" for=""></label><label class="labelname" title="红色" for="">红色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('绿色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#008000;" for=""></label><label class="labelname" title="绿色" for="">绿色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('花色')" type="checkbox" name="" /><label class="color_lump color_assortment" for=""></label><label class="labelname" title="花色" for="">花色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('蓝色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#0000ff;" for=""></label><label class="labelname" title="蓝色" for="">蓝色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('褐色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#855b00;" for=""></label><label class="labelname" title="褐色" for="">褐色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('透明')" type="checkbox" name="" /><label class="color_lump color_transparent" for=""></label><label class="labelname" title="透明" for="">透明</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('酒红色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#990000;" for=""></label><label class="labelname" title="酒红色" for="">酒红色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('黄色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#ffff00;" for=""></label><label class="labelname" title="黄色" for="">黄色</label></li>
			<li class="f_l w_100"><input class="chk" onclick="addcolor('黑色')" type="checkbox" name="" /><label class="color_lump" style="background-color:#000000;" for=""></label><label class="labelname" title="黑色" for="">黑色</label></li>
		</ul>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'za_value'); ?>&nbsp;&nbsp;&nbsp;&nbsp;: 
		<?php echo $form->textField($model,'za_value',array('size'=>50,'maxlength'=>255,'class'=>'t_ipt')); ?>
		<?php echo $form->error($model,'za_value'); ?><span class="c_999"><?php echo t('Attribute Note','adm') ?></span>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'za_search'); ?>: 
		<?php echo $form->radioButtonList($model,'za_search',Attribute::model()->getIsSreach()); ?>
		<?php echo $form->error($model,'za_search'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'za_photo'); ?>: 
		<?php echo $form->radioButtonList($model,'za_photo',Attribute::model()->getIsPhoto()); ?>
		<?php echo $form->error($model,'za_photo'); ?>
	</div>
	

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '保存' : '保存',array('class'=>'mem_btn mem_btn13')); ?> <input class="mem_btn mem_btn13 close" type="button" value="<?php echo t('Cancel','adm') ?>" onclick="$('.add_form').hide();">
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<script type="text/javascript">
function selectcolor(){
	$('#color').show();
	$('#Attribute_za_value').attr('onfocus','this.blur()');
}
function addcolor(name){
	var a=$('#Attribute_za_value').val();
	if(a==''){
		a=name;
	}else{
		a=a+','+name;
	}
	$('#Attribute_za_value').val(a);
}
</script>